package Bondarenko.algorithm.calc;

//string to array operation +,-,*,/...

public class StrToArr {
	
	public static Operation[] STA(String str) {
		char[] cArray = str.toCharArray();
		Operation[] arraySign = new Operation[str.length()];
		for (int i = 0; i < str.length(); i++){
		 if (cArray[i] == '+') arraySign[i] = Operation.PLUS;
		 else if (cArray[i] == '-') arraySign[i] = Operation.MINUS;
		 else if (cArray[i] == '*') arraySign[i] = Operation.MULTIPLY;
		 else if (cArray[i] == '/') arraySign[i] = Operation.DIVIDE;
			
		}
		return arraySign;
	
	}

}
